using Google.ProtocolBuffers;
using micromsg.Proto;
using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsg
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class UploadWeiboImgResponse : GeneratedMessageLite<UploadWeiboImgResponse, UploadWeiboImgResponse.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<UploadWeiboImgResponse, UploadWeiboImgResponse.Builder>
		{
			private bool resultIsReadOnly;
			private UploadWeiboImgResponse result;
			protected override UploadWeiboImgResponse.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override UploadWeiboImgResponse MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override UploadWeiboImgResponse DefaultInstanceForType
			{
				get
				{
					return UploadWeiboImgResponse.DefaultInstance;
				}
			}
			public BaseResponse BaseResponse
			{
				get
				{
					return this.result.BaseResponse;
				}
				set
				{
					this.SetBaseResponse(value);
				}
			}
			public string ClientImgId
			{
				get
				{
					return this.result.ClientImgId;
				}
				set
				{
					this.SetClientImgId(value);
				}
			}
			public uint TotalLen
			{
				get
				{
					return this.result.TotalLen;
				}
				set
				{
					this.SetTotalLen(value);
				}
			}
			public uint StartPos
			{
				get
				{
					return this.result.StartPos;
				}
				set
				{
					this.SetStartPos(value);
				}
			}
			public uint DataLen
			{
				get
				{
					return this.result.DataLen;
				}
				set
				{
					this.SetDataLen(value);
				}
			}
			public Builder()
			{
				this.result = UploadWeiboImgResponse.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(UploadWeiboImgResponse cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private UploadWeiboImgResponse PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					UploadWeiboImgResponse other = this.result;
					this.result = new UploadWeiboImgResponse();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override UploadWeiboImgResponse.Builder Clear()
			{
				this.result = UploadWeiboImgResponse.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override UploadWeiboImgResponse.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new UploadWeiboImgResponse.Builder(this.result);
				}
				return new UploadWeiboImgResponse.Builder().MergeFrom(this.result);
			}
			public override UploadWeiboImgResponse BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override UploadWeiboImgResponse.Builder MergeFrom(IMessageLite other)
			{
				if (other is UploadWeiboImgResponse)
				{
					return this.MergeFrom((UploadWeiboImgResponse)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override UploadWeiboImgResponse.Builder MergeFrom(UploadWeiboImgResponse other)
			{
				return this;
			}
			public override UploadWeiboImgResponse.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override UploadWeiboImgResponse.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(UploadWeiboImgResponse._uploadWeiboImgResponseFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = UploadWeiboImgResponse._uploadWeiboImgResponseFieldTags[num2];
					}
					uint num3 = num;
					if (num3 <= 18u)
					{
						if (num3 == 0u)
						{
							throw InvalidProtocolBufferException.InvalidTag();
						}
						if (num3 == 10u)
						{
							BaseResponse.Builder builder = BaseResponse.CreateBuilder();
							if (this.result.hasBaseResponse)
							{
								builder.MergeFrom(this.BaseResponse);
							}
							input.ReadMessage(builder, extensionRegistry);
							this.BaseResponse = builder.BuildPartial();
							continue;
						}
						if (num3 == 18u)
						{
							this.result.hasClientImgId = input.ReadString(ref this.result.clientImgId_);
							continue;
						}
					}
					else
					{
						if (num3 == 24u)
						{
							this.result.hasTotalLen = input.ReadUInt32(ref this.result.totalLen_);
							continue;
						}
						if (num3 == 32u)
						{
							this.result.hasStartPos = input.ReadUInt32(ref this.result.startPos_);
							continue;
						}
						if (num3 == 40u)
						{
							this.result.hasDataLen = input.ReadUInt32(ref this.result.dataLen_);
							continue;
						}
					}
					if (WireFormat.IsEndGroupTag(num))
					{
						return this;
					}
					this.ParseUnknownField(input, extensionRegistry, num, text);
				}
				return this;
			}
			public UploadWeiboImgResponse.Builder SetBaseResponse(BaseResponse value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasBaseResponse = true;
				this.result.baseResponse_ = value;
				return this;
			}
			public UploadWeiboImgResponse.Builder SetBaseResponse(BaseResponse.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasBaseResponse = true;
				this.result.baseResponse_ = builderForValue.Build();
				return this;
			}
			public UploadWeiboImgResponse.Builder MergeBaseResponse(BaseResponse value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasBaseResponse && this.result.baseResponse_ != BaseResponse.DefaultInstance)
				{
					this.result.baseResponse_ = BaseResponse.CreateBuilder(this.result.baseResponse_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.baseResponse_ = value;
				}
				this.result.hasBaseResponse = true;
				return this;
			}
			public UploadWeiboImgResponse.Builder ClearBaseResponse()
			{
				this.PrepareBuilder();
				this.result.hasBaseResponse = false;
				this.result.baseResponse_ = null;
				return this;
			}
			public UploadWeiboImgResponse.Builder SetClientImgId(string value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasClientImgId = true;
				this.result.clientImgId_ = value;
				return this;
			}
			public UploadWeiboImgResponse.Builder ClearClientImgId()
			{
				this.PrepareBuilder();
				this.result.hasClientImgId = false;
				this.result.clientImgId_ = "";
				return this;
			}
			public UploadWeiboImgResponse.Builder SetTotalLen(uint value)
			{
				this.PrepareBuilder();
				this.result.hasTotalLen = true;
				this.result.totalLen_ = value;
				return this;
			}
			public UploadWeiboImgResponse.Builder ClearTotalLen()
			{
				this.PrepareBuilder();
				this.result.hasTotalLen = false;
				this.result.totalLen_ = 0u;
				return this;
			}
			public UploadWeiboImgResponse.Builder SetStartPos(uint value)
			{
				this.PrepareBuilder();
				this.result.hasStartPos = true;
				this.result.startPos_ = value;
				return this;
			}
			public UploadWeiboImgResponse.Builder ClearStartPos()
			{
				this.PrepareBuilder();
				this.result.hasStartPos = false;
				this.result.startPos_ = 0u;
				return this;
			}
			public UploadWeiboImgResponse.Builder SetDataLen(uint value)
			{
				this.PrepareBuilder();
				this.result.hasDataLen = true;
				this.result.dataLen_ = value;
				return this;
			}
			public UploadWeiboImgResponse.Builder ClearDataLen()
			{
				this.PrepareBuilder();
				this.result.hasDataLen = false;
				this.result.dataLen_ = 0u;
				return this;
			}
		}
		public const int BaseResponseFieldNumber = 1;
		public const int ClientImgIdFieldNumber = 2;
		public const int TotalLenFieldNumber = 3;
		public const int StartPosFieldNumber = 4;
		public const int DataLenFieldNumber = 5;
		private static readonly UploadWeiboImgResponse defaultInstance;
		private static readonly string[] _uploadWeiboImgResponseFieldNames;
		private static readonly uint[] _uploadWeiboImgResponseFieldTags;
		private bool hasBaseResponse;
		private BaseResponse baseResponse_;
		private bool hasClientImgId;
		private string clientImgId_ = "";
		private bool hasTotalLen;
		private uint totalLen_;
		private bool hasStartPos;
		private uint startPos_;
		private bool hasDataLen;
		private uint dataLen_;
		private int memoizedSerializedSize = -1;
		public static UploadWeiboImgResponse DefaultInstance
		{
			get
			{
				return UploadWeiboImgResponse.defaultInstance;
			}
		}
		public override UploadWeiboImgResponse DefaultInstanceForType
		{
			get
			{
				return UploadWeiboImgResponse.DefaultInstance;
			}
		}
		protected override UploadWeiboImgResponse ThisMessage
		{
			get
			{
				return this;
			}
		}
		public BaseResponse BaseResponse
		{
			get
			{
				return this.baseResponse_ ?? BaseResponse.DefaultInstance;
			}
		}
		public string ClientImgId
		{
			get
			{
				return this.clientImgId_;
			}
		}
		public uint TotalLen
		{
			get
			{
				return this.totalLen_;
			}
		}
		public uint StartPos
		{
			get
			{
				return this.startPos_;
			}
		}
		public uint DataLen
		{
			get
			{
				return this.dataLen_;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				return this.hasBaseResponse && this.hasTotalLen && this.hasStartPos && this.hasDataLen && this.BaseResponse.IsInitialized;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasBaseResponse)
				{
					num += CodedOutputStream.ComputeMessageSize(1, this.BaseResponse);
				}
				if (this.hasClientImgId)
				{
					num += CodedOutputStream.ComputeStringSize(2, this.ClientImgId);
				}
				if (this.hasTotalLen)
				{
					num += CodedOutputStream.ComputeUInt32Size(3, this.TotalLen);
				}
				if (this.hasStartPos)
				{
					num += CodedOutputStream.ComputeUInt32Size(4, this.StartPos);
				}
				if (this.hasDataLen)
				{
					num += CodedOutputStream.ComputeUInt32Size(5, this.DataLen);
				}
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private UploadWeiboImgResponse()
		{
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] uploadWeiboImgResponseFieldNames = UploadWeiboImgResponse._uploadWeiboImgResponseFieldNames;
			if (this.hasBaseResponse)
			{
				output.WriteMessage(1, uploadWeiboImgResponseFieldNames[0], this.BaseResponse);
			}
			if (this.hasClientImgId)
			{
				output.WriteString(2, uploadWeiboImgResponseFieldNames[1], this.ClientImgId);
			}
			if (this.hasTotalLen)
			{
				output.WriteUInt32(3, uploadWeiboImgResponseFieldNames[4], this.TotalLen);
			}
			if (this.hasStartPos)
			{
				output.WriteUInt32(4, uploadWeiboImgResponseFieldNames[3], this.StartPos);
			}
			if (this.hasDataLen)
			{
				output.WriteUInt32(5, uploadWeiboImgResponseFieldNames[2], this.DataLen);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasBaseResponse)
			{
				num ^= this.baseResponse_.GetHashCode();
			}
			if (this.hasClientImgId)
			{
				num ^= this.clientImgId_.GetHashCode();
			}
			if (this.hasTotalLen)
			{
				num ^= this.totalLen_.GetHashCode();
			}
			if (this.hasStartPos)
			{
				num ^= this.startPos_.GetHashCode();
			}
			if (this.hasDataLen)
			{
				num ^= this.dataLen_.GetHashCode();
			}
			return num;
		}
		public override bool Equals(object object_0)
		{
			UploadWeiboImgResponse uploadWeiboImgResponse = object_0 as UploadWeiboImgResponse;
			return uploadWeiboImgResponse != null && (this.hasBaseResponse == uploadWeiboImgResponse.hasBaseResponse && (!this.hasBaseResponse || this.baseResponse_.Equals(uploadWeiboImgResponse.baseResponse_))) && (this.hasClientImgId == uploadWeiboImgResponse.hasClientImgId && (!this.hasClientImgId || this.clientImgId_.Equals(uploadWeiboImgResponse.clientImgId_))) && (this.hasTotalLen == uploadWeiboImgResponse.hasTotalLen && (!this.hasTotalLen || this.totalLen_.Equals(uploadWeiboImgResponse.totalLen_))) && (this.hasStartPos == uploadWeiboImgResponse.hasStartPos && (!this.hasStartPos || this.startPos_.Equals(uploadWeiboImgResponse.startPos_))) && (this.hasDataLen == uploadWeiboImgResponse.hasDataLen && (!this.hasDataLen || this.dataLen_.Equals(uploadWeiboImgResponse.dataLen_)));
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<UploadWeiboImgResponse, UploadWeiboImgResponse.Builder>.PrintField("BaseResponse", this.hasBaseResponse, this.baseResponse_, writer);
			GeneratedMessageLite<UploadWeiboImgResponse, UploadWeiboImgResponse.Builder>.PrintField("ClientImgId", this.hasClientImgId, this.clientImgId_, writer);
			GeneratedMessageLite<UploadWeiboImgResponse, UploadWeiboImgResponse.Builder>.PrintField("TotalLen", this.hasTotalLen, this.totalLen_, writer);
			GeneratedMessageLite<UploadWeiboImgResponse, UploadWeiboImgResponse.Builder>.PrintField("StartPos", this.hasStartPos, this.startPos_, writer);
			GeneratedMessageLite<UploadWeiboImgResponse, UploadWeiboImgResponse.Builder>.PrintField("DataLen", this.hasDataLen, this.dataLen_, writer);
		}
		public static UploadWeiboImgResponse ParseFrom(byte[] data)
		{
			return UploadWeiboImgResponse.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private UploadWeiboImgResponse MakeReadOnly()
		{
			return this;
		}
		public static UploadWeiboImgResponse.Builder CreateBuilder()
		{
			return new UploadWeiboImgResponse.Builder();
		}
		public override UploadWeiboImgResponse.Builder ToBuilder()
		{
			return UploadWeiboImgResponse.CreateBuilder(this);
		}
		public override UploadWeiboImgResponse.Builder CreateBuilderForType()
		{
			return new UploadWeiboImgResponse.Builder();
		}
		public static UploadWeiboImgResponse.Builder CreateBuilder(UploadWeiboImgResponse prototype)
		{
			return new UploadWeiboImgResponse.Builder(prototype);
		}
		static UploadWeiboImgResponse()
		{
			UploadWeiboImgResponse.defaultInstance = new UploadWeiboImgResponse().MakeReadOnly();
			UploadWeiboImgResponse._uploadWeiboImgResponseFieldNames = new string[]
			{
				"BaseResponse",
				"ClientImgId",
				"DataLen",
				"StartPos",
				"TotalLen"
			};
			UploadWeiboImgResponse._uploadWeiboImgResponseFieldTags = new uint[]
			{
				10u,
				18u,
				40u,
				32u,
				24u
			};
			object.ReferenceEquals(micromsg.Proto.UploadWeiboImgResponse.Descriptor, null);
		}
	}
}
